<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@page import="org.jeecgframework.core.util.SysThemesUtil,org.jeecgframework.core.enums.SysThemesEnum"%> 
<%
// String lang = org.jeecgframework.core.util.BrowserUtils.getBrowserLanguage(request);
// String langurl = "plug-in/mutiLang/" + lang +".js";
SysThemesEnum sysTheme = SysThemesUtil.getSysTheme(request);
String lhgdialogTheme = SysThemesUtil.getLhgdialogTheme(sysTheme);
// String path=request.getContextPath();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="plug-in/jquery/jquery-1.8.3.min.js" /></script>
<%-- <script src=<%=langurl%> type="text/javascript"></script> --%>
<link rel="stylesheet" href="css/index.css">
<title>注 册</title>
<style> 
.logininput{width:240px;float:left;}
.lbtitle{
	padding-top: 10px;
	width:90px;
	float: left;
}

.text_success {
	font-size:14px;
	text-align:center;
	margin:0px 0 35px 0;
	line-height:25px;
	position: absolute;
	left: 50%;
	width: 200px;
	top: 50%;
	z-index: 50;
	margin-left: -100px;
	text-transform: uppercase;
	padding: 20px 0px;
	margin-top: -100px;
	display: none;
}
.text_success img {
}
.text_success span {
	display: block;
	padding: 10px;
	color: #CCC;
}

body.error {
	background-image: url(../images/pick_bg.error.jpg);
}

</style>
</head>
<body>
<!--头部 -->
<%@include file="head.jsp"%>

<!--main -->
<div class="reg_main">
	<div class="reg_main_center">
		<div class="reg_top">已有账户？现在登录</div>
		<div class="reg_center_c">
			<div class="reg_center">
				<div style="border-bottom: 2px solid #ff6600; width: 95px; padding-top: 10px;">
					<img style="margin-left: 10px; padding-bottom: 5px;" src="imges/reg.png" />
				</div>
				<div style="margin-left: 50px; margin-top: -25px; font-size: 15px">
					<span>注册新会员</span>
				</div>
			</div>
			<div id="successLogin"></div>
   			<div class="text_success"><img src="plug-in/login/images/loader_green.gif" alt="Please wait" /> <span><t:mutiLang langKey="common.login.success.wait"/></span></div>
			<div class="reg_mtw" id="regFrom">
				<form name="formRegister" id="formRegister" action="" method="post" >
<!-- 				<form name="formRegister" id="formRegister" action="registerController.do?register" check="registerController.do?checkRegister" method="post"> -->
					<div class="reg_rfm">
						<table>
							<tbody>
								<tr> 
									<font color ="#FF0000"><div id="alertMessage" style="margin-left: 120px;"></div></font>
									<th><label for="CU95N">用户名 </label></th>
									<td>
										<input id="userName" name="userName" class="px er" tabindex="0" maxlength="25" onblur="chkpwd3()" type="text" required=""> 
									</td>
									<td class="tipcol">
										<span style="color: #fb000b; font-weight: bold">*</span> <span>账户名是您以后登录所用的账号，可以由字面a-z或数字组成</span>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="reg_rfm">
						<table>
							<tbody>
								<tr>
									<th><label for="CU95N">email </label></th>
									<td>
										<input id="email" name="email" type="text" class="px er" tabindex="1" size="25" maxlength="15" required="">
									</td>
									<td class="tipcol">
										<span style="color: #fb000b; font-weight: bold">*</span> <span>您将使用此邮箱登录，请输入正确的常用邮箱</span>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="reg_rfm">
						<table>
							<tbody>
								<tr>
									<th><label for="CU95N">密码 </label></th>
									<td>
										<input id="password" name="password"  type="password" class="px er" tabindex="1" size="25" maxlength="15" required="">
									</td>
									<td class="tipcol">
										<span style="color: #fb000b; font-weight: bold">*</span> <span>6-20位字符。密码由字母a-z及数字组成。</span>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="reg_rfm" style="line-height: 0px;">
						<table>
							<tbody>
								<tr>
									<th><label for="CU95N">密码强度 </label></th>
									<td id="strength_L" style="background: #ff6600;" width="35">弱</td>
									<td id="strength_L" style="background: #ffd09a;" width="35">中</td>
									<td id="strength_L" style="background: #ffd09a;" width="35">强</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="reg_rfm">
						<table>
							<tbody>
								<tr>
									<th><label for="CU95N">确认密码 </label></th>
									<td>
										<input  id="qrPassWord" name="qrPassWord"  type="password" class="px er" tabindex="1" size="25" maxlength="15" required="">
									</td>
									<td class="tipcol">
										<span style="color: #fb000b; font-weight: bold">*</span> <span>请再次输入密码</span>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="reg_rfm">
						<table>
							<tbody>
								<tr>
									<th><label for="CU95N">QQ </label></th>
									<td>
										<input id="qq" name="qq" type="text" class="px er" tabindex="1" size="25" maxlength="15" required="">
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="reg_rfm">
						<table>
							<tbody>
								<tr>
									<th><label for="CU95N">手机号</label></th>
									<td>
										<input id="phone" name="phone" type="text" class="px er" tabindex="1" size="25" maxlength="15" required="">
									</td>
									<td>
										<input class="pn" style="height: 20px; padding: 0 5px;" type="button" id="send" value="发送" name="send">
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="reg_rfm">
						<table>
							<tbody>
								<tr>
									<th><label for="CU95N">短信验证码</label></th>
									<td>
										<input id="authCode" name="authCode" type="text" class="px er" tabindex="1" size="25" maxlength="15" required="">
									</td>
								</tr>
							</tbody>
						</table>
					</div>

					<div class="reg_rfm">
						<table>
							<tbody>
								<tr>
									<th><label for="CU95N">验证码</label></th>
									<td>
										<input id="randCodeImageStr" name="randCodeImageStr" type="text" class="px er" tabindex="1" size="25" maxlength="15" required="">
									</td>
									<td>
										<a href="#">换一个</a>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="reg_rfm" style="margin-top: -16px;">
						<table>
							<tbody>
								<tr>
									<th></th>
									<td>
										<span id="vseccode_cS">输入下图中的字符<br> <!-- 									<img width="200" height="60" src="imges/misc.png" alt=""> --> 
										<img  id="randCodeImage" src="randCodeImage" style="width: 200px; height: 60px" />
										</span>
									</td>

								</tr>
							</tbody>
						</table>
					</div>
					
					<div class="reg_rfm">
						<table>
							<tbody>
								<tr>
									<th></th>
									<td>
										<label>
											<input name="checkbox" id="checkbox" checked="checked" disabled="disabled" type="checkbox">
											我已经仔细阅读并接受
											<a href="#">《服务协议》</a>
										</label>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
					<div class="reg_rfm">
						<table>
							<tbody>
								<tr>
									<th></th>
									<td>
										<button id="but_register"  onclick="register()">立即注册</button>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>


<!--foot -->
<%@include file="foot.jsp"%>

</body>
<script type="text/javascript" src="js/register.js"></script>

</html>

<script>
function register() {
	$.ajax({
		async : false,
		cache : false,
		type : 'POST',
		url : 'registerController.do?register',
		dataType:'json',
		data : {
			username:$("#userName").val(),
			email:$("#email").val(),
			password:$("#password").val(),
			qrPassWord:$("#qrPassWord").val(),
			qq:$("#qq").val(),
			phone:$("#phone").val(),
			authCode:$("#authCode").val(),
			randCodeImageStr:$("#randCodeImageStr").val()
			},
			success : function(data) {
			if (data.success) {
				alert(data.msg);
					var url='<%=path%>' + "/indexController.do?index";
					location.href = url;
				} else {
					alert(data.msg);
				}
			},

			error : function() {// 请求失败处理函数
				alert("注册信息有误请重新填写！");
			}

		});
	}
</script>